-- @author shaodongyang
-- ods主站详情日志

use hdp_lbg_supin_zplisting;

insert overwrite table dws_hism_movielens_links partition (dt='${RUNDATE}')
select
    movie_id,
    title,
    count(distinct genres) as genres_cnt,
    concat_ws(',',collect_set(imdb_id)) as imdb_ids,
    concat_ws(',',collect_set(tmdb_id)) as tmdb_ids
from hdp_lbg_supin_zplisting.dwd_hism_movielens_links
where dt = '${RUNDATE}'
group by movie_id, title;
